package com.testitems.service.user;

import com.baomidou.mybatisplus.extension.service.IService;
import com.testitems.common.web.page.PageInfo;
import com.testitems.config.security.UserInfo;
import com.testitems.controller.user.dto.UserCreateRequest;
import com.testitems.controller.user.dto.UserSearchRequest;
import com.testitems.controller.user.dto.UserUpdateRequest;
import com.testitems.repo.entity.User;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author GFH
 * @since 2021-11-20
 */
public interface IUserService extends IService<User> {
    String CACHE_USER_5MINS = "user:cache:5m";

    PageInfo<User> search(UserSearchRequest request);

    User getByUserNameFromCache(String username);

    User getByUserName(String userName);

    void createdUser(UserCreateRequest request, UserInfo userInfo);

    void updateByUserId(Integer id, UserUpdateRequest request,UserInfo  userInfo);
    void logicDelete(Integer id,UserInfo userInfo);
}
